<template>
    <el-dialog
            :close-on-click-modal="false"
            :model-value="api.detailState.visible"
            :title="api.detailState.title"
            destroy-on-close
            width="600"
            @close="api.onCloseDetail()"
    >
        <el-descriptions :column="1">
            <el-descriptions-item label="用户类型">{{ api.detailState.form.userType }}</el-descriptions-item>
            <el-descriptions-item label="用户id">{{ api.detailState.form.userId }}</el-descriptions-item>
            <el-descriptions-item label="用户名">{{ api.detailState.form.username }}</el-descriptions-item>
            <el-descriptions-item label="密码">{{ api.detailState.form.password }}</el-descriptions-item>
            <el-descriptions-item label="认证方式">{{ api.detailState.form.authType }}</el-descriptions-item>
            <el-descriptions-item label="加密盐">{{ api.detailState.form.secretSalt }}</el-descriptions-item>
            <el-descriptions-item label="是否过期">{{ api.detailState.form.accountNonExpired }}</el-descriptions-item>
            <el-descriptions-item label="是否锁定">{{ api.detailState.form.accountNonLocked }}</el-descriptions-item>
            <el-descriptions-item label="凭证是否过期">{{ api.detailState.form.credentialsNonExpired }}</el-descriptions-item>
            <el-descriptions-item label="是否可用">{{ api.detailState.form.enabled }}</el-descriptions-item>
        </el-descriptions>
    </el-dialog>
</template>

<script lang="ts" setup>
import {AccountApi} from "~/api/system/account/account.api";

interface Props {
    api: AccountApi;
}

const {api} = withDefaults(defineProps<Props>(), {});

</script>

<style lang="less" scoped>

</style>
